﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp19
{
    class Program
    {
        static void Main(string[] args)
        {
            int[]number = { 44,25,52,21,43 };
            int sum = 0;
            int avg= 0;
            foreach (int numbers in number)
            {
                sum = sum+numbers;
            }
            avg = sum / number.Length;
            Console.WriteLine("总数为：" + sum);
            Console.WriteLine("平均数为：" + avg);



            string address = "福建,河南,江西,云南";
            char[] c = new char[] { ',' };
            string[] ad = address.Split(c);
            for(int i=0;i<ad.Length;i++)
            {
                Console.WriteLine(ad[i]);
            }
        }
    }
}
